package com.ynet.middleground.mobile.approve.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * 签章动作参数信息
 */
public enum SignActionEnum {

    SIGN_NODE_FUNDING_PARTIES("signNodeFundingParties", "资金方本身签署"), SIGN_NODE_END("signNodeEnd", "全流程审批完成后-签章");

    private final String name;

    private final String desc;

    SignActionEnum(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return desc;
    }

    private static final Map<String, SignActionEnum> signActionEnumMap = new HashMap<>();
    static {
        for (SignActionEnum value : SignActionEnum.values()) {
            signActionEnumMap.put(value.name, value);
        }
    }

    public static SignActionEnum find(String name) {
        return signActionEnumMap.get(name);
    }

    public static Map<String, SignActionEnum> actionEnumMap() {
        return new HashMap<>(signActionEnumMap);
    }

}
